import axios from '@/libs/api.request'
import qs from 'qs'

export const getTableData = (params) => {
  return axios.request({
    url: 'admins/equipmentCatory/page?t='+new Date().getTime(),
    params,
    method: 'get'
  })
}

export const findById = (params) => {
  return axios.request({
    url: 'admins/equipmentCatory/findById?t='+new Date().getTime(),
    params,
    method: 'get'
  })
}

export const add = (data) => {
  return axios.request({
    url: 'admins/equipmentCatory/add',
    data: qs.stringify(data),
    method: 'post'
  })
}

export const update = (data) => {
  return axios.request({
    url: 'admins/equipmentCatory/update',
    data: qs.stringify(data),
    method: 'post'
  })
}

export const del = (data) => {
  return axios.request({
    url: 'admins/equipmentCatory/delete',
    data: qs.stringify(data),
    method: 'post'
  })
}

//导出
export const downExcel = (params) => {
  return axios.request({
    url: 'admins/equipmentCatory/download?t='+new Date().getTime(),
    method: 'get',
    responseType: 'blob',
    params
  })
}
